package com.qf.demo;

import com.qf.dao.AccountDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @Description: 公用常量
 * @Data: 2022/8/30 12:07
 * @Pacakge: com.qf.demo
 * @ClassName: AccountDaoDemo
 * @Author: fan
 */
public class AccountDaoDemo {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("bean.xml");
        AccountDao accountDao = (AccountDao) applicationContext.getBean("accountDaoImpl");
        accountDao.addAccount();
        //关闭容器
        ((ClassPathXmlApplicationContext)applicationContext).close();
    }

}
